package com.kancy.spring.boot.drools.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * <p>
 * DroolsProperties
 * <p>
 *
 * @author: kancy
 * @date: 2020/3/15 13:51
 **/
public class DroolsProperties {

    /**
     * 规则动态扫描
     */
    private Scanner scanner = new Scanner();

    public Scanner getScanner() {
        return scanner;
    }

    public void setScanner(Scanner scanner) {
        this.scanner = scanner;
    }

    public static class Scanner {

        private boolean enabled = true;
        /**
         * 规则动态刷新间隔，单位毫秒
         */
        private long interval = 1500;

        public boolean isEnabled() {
            return enabled;
        }

        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }

        public long getInterval() {
            return interval;
        }

        public void setInterval(long interval) {
            this.interval = interval;
        }
    }
}
